#!/usr/bin/env python
# encoding:utf-8
'''
@author: yangyongjie
@license: (C) Copyright 2013-2017, Node Supply Chain Manager Corporation Limited. 
@contact: deamoncao100@gmail.com
software: garner
@file: message.py
@time: 2022/8/29 16:34
@desc:
'''

from model import db
import datetime
class Message(db.Model):
    __tblename__ = "message"
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    user_id = db.Column(db.ForeignKey("user.id"))
    commodity_id = db.Column(db.ForeignKey("commodity.id"))
    content = db.Column(db.String(256), nullable=False)
    date = db.Column(db.DateTime,  default=datetime.datetime.now())